package xyz.zhouzhaodong.crm.controller;


import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xyz.zhouzhaodong.crm.dto.RegistrationFeeDto;
import xyz.zhouzhaodong.crm.entity.RegistrationFee;
import xyz.zhouzhaodong.crm.service.IRegistrationFeeService;
import xyz.zhouzhaodong.crm.util.NoRepeatSubmit;
import xyz.zhouzhaodong.crm.util.RestMessage;

import javax.annotation.Resource;

/**
 * <p>
 * 报名费，高校部自己维护 前端控制器
 * </p>
 *
 * @author zhouzhaodong
 * @since 2020-06-29
 */
@RestController
@RequestMapping("/registration-fee")
public class RegistrationFeeController {

    @Resource
    IRegistrationFeeService registrationFeeService;

    /**
     * 新增报名费
     * @param registrationFee
     * @return
     */
    @NoRepeatSubmit
    @RequestMapping("/add")
    public RestMessage addRegistrationFee(RegistrationFee registrationFee){
        return registrationFeeService.addRegistrationFee(registrationFee);
    }

    /**
     * 删除报名费
     * @param registrationFee
     * @return
     */
    @RequestMapping("/delete")
    public RestMessage deleteRegistrationFee(RegistrationFee registrationFee){
        return registrationFeeService.deleteRegistrationFee(registrationFee);
    }

    /**
     * 修改报名费
     * @param registrationFee
     * @return
     */
    @RequestMapping("/update")
    public RestMessage updateRegistrationFee(RegistrationFee registrationFee){
        return registrationFeeService.updateRegistrationFee(registrationFee);
    }

    /**
     * 查询报名费
     * @param registrationFeeDto
     * @return
     */
    @RequestMapping("/select")
    public RestMessage selectRegistrationFee(RegistrationFeeDto registrationFeeDto){
        return registrationFeeService.selectRegistrationFee(registrationFeeDto);
    }
    
}
